package com.bstek.bdf4.mq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Title: 消息消费者
 * @Package: com.bstek.bdf4.mq.consumer
 * @Description:
 * @Author: zxq
 * @Date: 2024/2/5 - 15:05
 */

@Slf4j
@Component
public class BstekConsumerService {


//    @RabbitListener(queues = "#")
//    public void listenSimpleQueueMessage(HashMap<String,Object> msg){
//        log.info("-----------消费者接收到消息：【{}】", msg);
//    }

//   @RabbitListener(queues = "#{bstekDynamicQueue.name}")
//    public void listenQueueMessage2(MessageInfo msg){
//        log.info("-----------消费者接收到消息：【{}】", msg);
//
//    }

    @RabbitListener(bindings = @QueueBinding(
            value = @Queue(name = "topic.queue1"),
            exchange = @Exchange(name = "bstek.topic", type = ExchangeTypes.TOPIC),
            key = "china.#"
    ))
    public void handlerTopicQueue(){

    }


}
